﻿package com.ux.tween
{
	

	/**
	 * @author winnie
	 */	
	dynamic public class TweenUxVars
	{
		public var _value : Object;
		
		public function TweenUxVars( vars:Object = null )
		{
			_value = new Object();
		}
		
		public function set( _property:String, _val:* ):TweenUxVars
		{
			_value[_property] = _val;
			return this;
		}
		
		public function get value():Object
		{
			return _value;
		}
		
		public function x( _x:Number ):TweenUxVars { return set( "x", _x ); }
		public function y( _y:Number ):TweenUxVars { return set( "y", _y ); }
		public function width( _width:Number ):TweenUxVars { return set( "width", _width ); }
		public function height( _height:Number ):TweenUxVars { return set( "height", _height ); }
		public function scaleX( _scaleX:Number ):TweenUxVars { return set( "scaleX", _scaleX ); }
		public function scaleY( _scaleY:Number ):TweenUxVars { return set( "scaleY", _scaleY ); }
		public function yoyoCount( _yoyoCount:Number ):TweenUxVars { return set( "yoyoCount", _yoyoCount ); }
		public function onComplete( _onComplete:Function ):TweenUxVars { return set( "onComplete", _onComplete ); }
		public function onUpdate( _onUpdate:Function ):TweenUxVars { return set( "onUpdate", _onUpdate ); }
		public function onStart( _onStart:Function ):TweenUxVars { return set( "onStart", _onStart ); }
		
		public function destory():void
		{
			_value = null;
		}
	}
}